﻿Imports System
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Imports System.IO
Imports System.Xml.Serialization
Imports Microsoft.TeamFoundation.WorkItemTracking.Client
Imports System.Threading

Namespace Items


    Public MustInherit Class Item
        Implements INotifyPropertyChanged
        Implements IEquatable(Of Item)

        Public Sub New(ByVal Id As Integer)
            m_Id = Id
        End Sub

        Private m_Id As Integer

        Public ReadOnly Property Id() As Integer
            Get
                Return m_Id
            End Get
        End Property



#Region " INotifyPropertyChanged "

        Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

        Public Sub OnPropertyChanged(ByVal PropertyName As String)
            If Not PropertyChangedEvent Is Nothing Then
                RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(PropertyName))
            End If
        End Sub

#End Region

#Region " IEquatable(Of TItem) "

        Public Shadows Function Equals(ByVal other As Item) As Boolean Implements System.IEquatable(Of Item).Equals
            Return other.Id = Me.Id
        End Function

#End Region

    End Class

End Namespace